


local IconPath={}

---道具图片
function IconPath.itemIcon(icon_id)
    return string.format("UI/icon/daoju/%d.png",1001)
end


---背包格子品质
function IconPath.cellQualityIcon(quality)
    return string.format("UI/GeneralUI/daojukuang/Equipment_%02.png",quality)
end

---检查文件是否存在
function IconPath.checkFile(filepath)
    return cc.FileUtils:getInstance():isFileExist(filepath)
end

---检查动画是否存在动作(如果存在会直接执行动作，不存在就执行动作数组里的第一个动作)
function IconPath.checkAction(armature,act_name,tx_name)
    local movement=armature:getAnimation():getAnimationData():getMovement(act_name)
    if movement then 
        armature:getAnimation():play(act_name)
    else
        local err_msg=string.format("动画:%s没有动作:%s",tx_name,act_name)
        FZutil.send_log(err_msg,3)
        armature:getAnimation():playWithIndex(0)
    end
end

---红点
function IconPath.redPointIcon()
	return "UI/GeneralUI/icon/icon_redPoint.png"
end

---播放一个cocos做的特效
function IconPath.playTX(txnode,loop,speed)
    local act=txnode.animation
    act:gotoFrameAndPlay(0,loop)
    if speed then
        act:setTimeSpeed(speed)
    end
    txnode:runAction(act)
end

return IconPath